﻿using System.IO;
using Xarmarin.GoldFinger.Engine.DbMigration;
using Xarmarin.GoldFinger.Services;

namespace Xarmarin.GoldFinger.ApplicationCore
{
    public class Initializer
    {
        public static bool ApplicationInit_Start()
        {
            if (IsSubjectEmpty)
            {
                //初始化数据库
                DefaultMigration.Start();

                return false;
            }
            else
            {
                return true;
            }
        }

        /// <summary>
        ///角色是否为空
        /// </summary>
        /// <returns>  </returns>
        public static bool IsSubjectEmpty
        {
            get
            {
                return SubjectDataStore.CheckIsEmpty();
            }
        }
    }
}
